]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Close menus on session mode changes
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 14 Sep 2017 15:12:12 +0000 (17:12 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 4 Oct 2017 16:12:27 +0000 (18:12 +0200)
We are already closing top bar menus on session mode changes, but
as this behavior makes sense for any other menus as well - dash
context menus or the background menu for instance - just generalize
the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=787676

js/ui/panel.js
js/ui/popupMenu.js

index dc65366559dbcfc69eca14614b639967ea8a0671..d7c8397b50bb8d86f219c9ede67e77bdc6ea8c85 100644 (file)
@@ -1084,8 +1084,6 @@ var Panel = new Lang.Class({
             let indicator = this.statusArea[role];
             if (!indicator)
                 continue;
-            if (indicator.menu)
-                indicator.menu.close();
             indicator.container.hide();
         }
     },
index a2a4df34012aa193f76549b8c0cda34bbaa41620..d00132ff978575708a8f199c6d304512a19accbb 100644 (file)
@@ -465,6 +465,7 @@ var PopupMenuBase = new Lang.Class({
 
     _sessionUpdated: function() {
         this._setSettingsVisibility(Main.sessionMode.allowSettings);
+        this.close();
     },
 
     addAction: function(title, callback, icon) {